﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Admin/PMAdmin.Master"
    CodeBehind="BankDepositsOverview.aspx.cs" Inherits="PM.Site.Admin.BankDepositsOverview" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <asp:Button ID="btnAdd" runat="server" Text="Add" OnClick="btnAdd_Click" />
    </div>
    <div>
        <asp:Label ID="lblMsg" runat="server" Text="" Visible="false"></asp:Label>
    </div>
    <br />
    <div class="form_left">
       <p style="font-size:small;font-weight:bold;">Client : &nbsp;<asp:DropDownList ID="ddlClientIds" runat="server" AutoPostBack="true"
            onselectedindexchanged="ddlClientIds_SelectedIndexChanged">
        <asp:ListItem Text="~Select all~" Value="" Selected="True"></asp:ListItem>
        </asp:DropDownList></p>
    </div>
    <br style="clear:both;"/>
    <br />
    <div class="form_left" style="width:1200px;">
        <asp:Panel ID="pnlOverviewBankDepositss" runat="server" Font-Size="Medium" GroupingText="Overview Bank Deposits">
            <div style="padding: 5px;">
                <asp:DataList ID="dlBankDeposits" runat="server" Visible="true" RepeatDirection="Horizontal"
                    CellPadding="0" CellSpacing="0" Font-Size="Smaller" ItemStyle-BackColor="#F6F4F5"
                    ItemStyle-BorderColor="#6B6B6B" ItemStyle-BorderWidth="1px" HeaderStyle-BackColor="#444444"
                    HeaderStyle-Height="30px" RepeatColumns="1" RepeatLayout="Flow" OnItemCommand="dlBankDeposits_ItemCommand">
                    <AlternatingItemStyle BackColor="#F9F9F9" />
                    <HeaderTemplate>
                        <div style="padding-bottom: 0px; height: 30px; margin: 0px; color: White;">
                            <div style="width: 100px; float: left; text-align: center; font-weight: bold; padding-left: 2px;">
                                Client Id
                            </div>
                            <div style="width: 100px; float: left; text-align: center; font-weight: bold; padding-left: 2px;">
                                Bank Id
                            </div>
                            <div style="width: 100px; float: left; text-align: center; font-weight: bold;">
                                Account No
                            </div>
                            <div style="width: 100px; float: left; text-align: center; font-weight: bold;">
                                Acc. Type
                            </div>
                            <div style="width: 140px; float: left; text-align: center; font-weight: bold;">
                                Invest. Value
                            </div>
                            <div style="width: 120px; float: left; text-align: center; font-weight: bold;">
                                Invest. Date
                            </div>
                            <div style="width: 130px; float: left; text-align: center; font-weight: bold;">
                                Maturity Date
                            </div>
                            <div style="width: 80px; float: left; text-align: center; font-weight: bold;">
                                Rate
                            </div>
                            <div style="width: 110px; float: left; text-align: center; font-weight: bold;">
                                Accur. Inter.
                            </div>
                            <div style="width: 90px; float: left; text-align: center; font-weight: bold;">
                                Active
                            </div>
                            <div style="width: 80px; float: left; text-align: center; font-weight: bold;">
                                Edit
                            </div>
                        </div>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <div style="float: left; margin-bottom: 0px; min-height: 15px; font-size: smaller;">
                            <div style="width: 100px; float: left; text-align: center; min-height: 12px; padding-left: 2px;">
                                <asp:Label ID="lblClientId" runat="server" Text='<%# Eval("ClientId")%>' />
                            </div>
                            <div style="width: 100px; float: left; text-align: center; min-height: 12px;">
                                <asp:Label ID="lblBankId" runat="server" Text='<%# Eval("BankId")%>'></asp:Label>
                            </div>
                            <div style="width: 100px; float: left; text-align: center; min-height: 12px;">
                                <asp:Label ID="lblAccNo" runat="server" Text='<%# Eval("AccNo")%>'></asp:Label>
                            </div>
                            <div style="width: 100px; float: left; text-align: center; min-height: 12px;">
                                <label>
                                    <%# Eval("AccType")%>
                                </label>
                            </div>
                            <div style="width: 115px; float: left; text-align: right; min-height: 12px;">
                                <label>
                                    <%# Eval("InvestValue", "{0:0.00}")%>
                                </label>
                            </div>
                            <div style="width: 165px; float: left; text-align: center; min-height: 12px;">
                                <label>
                                    <%# ((DateTime)Eval("InvestDate")).ToShortDateString()%>
                                </label>
                            </div>
                            <div style="width: 100px; float: left; text-align: center; min-height: 12px;">
                                <label>
                                    <%# (((DateTime)Eval("MaturityDate")) == DateTime.MinValue) ? string.Empty : ((DateTime)Eval("MaturityDate")).ToShortDateString()%>
                                </label>
                            </div>
                            <div style="width: 70px; float: left; text-align: right; min-height: 12px;">
                                <label>
                                    <%# Eval("Rate", "{0:0.00}")%>
                                </label>
                            </div>
                            <div style="width: 110px; float: left; text-align: right; min-height: 12px;">
                                <label>
                                    <%# Eval("AccruedInterest", "{0:0.00}")%>
                                </label>
                            </div>
                            <div style="width: 80px; float: left; text-align: right; min-height: 12px;">
                                <asp:CheckBox ID="chkActive" Checked='<%#Eval("Active") %>' runat="server" Enabled="false" />
                            </div>
                            <div style="width: 80px; text-align: right; vertical-align: top; float: left; padding-right: 30px;">
                                <asp:ImageButton ID="imgEdit" CommandName="EditBankDeposit" ImageUrl="~/Images/Edit.gif"
                                    runat="server" AlternateText="Edit Bank Deposit" />
                            </div>
                        </div>
                    </ItemTemplate>
                </asp:DataList>
            </div>
            <div style="padding: 5px;text-align:center; ">
                <asp:Button ID="btnCalcAccrued" runat="server" Text="Calculate Accrued Interest" OnClick="btnCalcAccrued_Click" />
            </div>
            <br />
        </asp:Panel>
    </div>
</asp:Content>
